/*
** Xin YUAN, 2024, BSD (2)
*/

////////////////////////////////////////////////////////////////////////////////

//------------------------------------------------------------------------------
//macros

#ifndef char_s
#define char_s  char
#endif

#ifndef _s
#define _s(x)  x
#endif

#ifndef main_s
#define main_s  main
#endif

#ifndef outputf
#define outputf  printf
#endif
#ifndef outputf_s
#define outputf_s  printf
#endif

//------------------------------------------------------------------------------
//functions

#ifndef thread_sleep
inline void thread_sleep(uint32_t tm) noexcept
{
	struct timespec tms, tmd;
	tms.tv_sec = tm / 1000;
	tms.tv_nsec = (tm % 1000) * 1000 * 1000;
	::nanosleep(&tms, &tmd);  //no check
}
#endif

////////////////////////////////////////////////////////////////////////////////
